package org.dromara.business.domain.bo;

import org.dromara.business.domain.PlayHistory;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * 统一播放记录业务对象 t_play_history
 *
 * @author Hao Tong Xue
 * @date 2025-04-21
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = PlayHistory.class, reverseConvertGenerate = false)
public class PlayHistoryBo extends BaseEntity {

    /**
     * 播放记录ID
     */
    @NotNull(message = "播放记录ID不能为空", groups = { EditGroup.class })
    private Long id;

    /**
     * 内容ID（视频/音频等）
     */
    @NotNull(message = "内容ID（视频/音频等）不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long contentId;

    /**
     * 内容类型：1-视频，2-音频，3-直播
     */
    @NotNull(message = "内容类型：1-视频，2-音频 不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer contentType;

    /**
     * 本次播放时长（秒）
     */
    @NotNull(message = "本次播放时长（秒）不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer playDuration;

    /**
     * 是否播放完成：0-未完成，1-完成
     */
    private Integer isCompleted;

    /**
     * 观看次数（同内容同会话累计）
     */
    private Integer watchCount;

    /**
     * 备注
     */
    private String remark;


}
